﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Autodesk.Revit.DB;

namespace RevitReadAutoCAD.TeighaHelper.CadModels
{
    public class CadMLine
    {
        public XYZ Startpoint { get; set; }
        public XYZ EndPoint { get; set; }
        public XYZ MiddlePoint
        {
            get
            {
                return (Startpoint != null && EndPoint != null) ? (Startpoint / 2 + EndPoint / 2) :null;
            }
        }
        public double Length
        {
            get { return (Startpoint != null && EndPoint != null) ? Startpoint.DistanceTo(EndPoint) : 0; }
        }
    }
}
